<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>解构赋值</title>
</head>

<body>
  <p>解构赋值的一些demo</p>
  <script>
    // ES6 允许按照一定模式， 从数组和对象中提取值， 对变量进行赋值， 这被称为解构
    let [a, b, c] = [1, 2, 3]
    console.log(a, b, c);
    // 拓展运算符
    let [ab, ...bc] = [a, b, c];
    console.log(bc);
  </script>
</body>

</html>